-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
reST support #56
reST support #56
Conversation
I definitely like the idea. reStructuredText is probably more commonly used in Python code than markdown. I'll test this soon. Feel free to recommend any documentation heavy codes base using reST to test this against. Thanks for the pull request. |
YES I WANT THIS |
I ran this new feature against Sphinx and Requests repositories. Some issues I've found so far:
These may be due to limitations in python-creole. Unfortunately I haven't found any code in the wild that this generates reasonable HTML yet. We may need to create a sample file to test out this feature. |
Corrections/improvements for reST support
Hi Trey, thanks for the feedback, I found that I tried running the feature against the Request repo, and docutils errors and warnings are being printed by I'll let you know next week if I've figured out this. |
Hey Thomas, You're right. I actually hadn't been running it through rest2html properly. I now see those warnings and errors you mention when running against requests repository. The top level reST support does seems to work well for some files ( Let me know if you make more progress on this. I'll be testing this feature out on my own code in the meantime. |
Why not use docutils, the origin of reST? It's almost as easy as using docutils.core.publish_parts. I'm using this on some internal stuff right now. Admittedly I had to do a pretty ugly hack to get it to work on sphinx, but it does work.
|
@adambard Using your code unfortunately doesn't fix the issue I have when running this on the requests code. I believe When running the following on the requests code:
I receive:
|
oreos/monkeys.py looks to be commented in markdown. Docutils tends to be very picky about its input, so maybe it's not a good fit here. It just jumped into my head when I saw reST mentioned. Then again, perhaps it could be worked to use docutils reST first, and markdown as a fallback, since markdown will do a reasonable job on reST (if not vice-versa). That really starts to pile the requirements on though. |
oreos should be removed in the next release, fwiw :) |
I can't tell where this is at and whether it's blocking on anything. Is there a "final-ish" version of reST support? If so, where is it? Does it just need more testing or are there more bugs to be fixed? |
I think this needs more testing and probably at a minimum some bug fixes for exception handling (when invalid reST is found). |
Any movement on this? I'd love to see reST in Pycco. |
I have issues with merging this without confidence that:
As I see it, the best way to ensure both of those would be to add tests to Pycco (#54). Pycco has no test suite. No tests means the users are the testers. I use Pycco very rarely now so I'm not comfortable considering myself a tester nor giving new nontrivial features a stamp of approval. I welcome any progress toward adding tests to Pycco. Also if anyone that uses Pycco more often than I do wants to help maintain, please say so. |
Would also like to see it... can help with running the tests. |
+1, this would be awesome. |
@treyhunner, ok, but if you never merge, users will never try it. If you break something, users will complain, if they don't complain, everything is alright. +1 for this feature. |
@carlos-jenkins valid point. I had some issues with this the last time I try it. If a couple people are willing to test it out and vouch for its merge-worthiness I'll go ahead and merge it. Without a test suite, dog fooding is necessary for testing. I haven't used pycco in a long time so I haven't been able to test these features myself. I think this project is in need of more active users with push access. Anyone volunteer to help test and merge/close open pull requests? |
+1 for this feature too! |
I added basic reST support to pycco, using creole's rest2html(). What are your thoughts on this?
Regards,
Thomas